package org.jeecg.modules.xl.order.vo;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.jeecg.common.aspect.annotation.Dict;
import org.jeecg.common.constant.ProvinceCityArea;
import org.jeecg.common.util.SpringContextUtils;
import org.jeecg.modules.xl.order.entity.XlCustomerOrderDetail;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.jeecgframework.poi.excel.annotation.ExcelCollection;
import org.springframework.format.annotation.DateTimeFormat;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

/**
 * @Description: xl_customer_order
 * @Author: jeecg-boot
 * @Date:   2024-10-20
 * @Version: V1.0
 */
@Data
@ApiModel(value="采购订单VO")
public class XlCustomerOrdeVO {

	/**主键*/
	@ApiModelProperty(value = "主键")
    private String id;
	/**订单单号*/
	@Excel(name = "订单单号", width = 15)
	@ApiModelProperty(value = "订单单号")
    private String orderCode;
	/**门店编号*/
	@Excel(name = "门店编号")
	@ApiModelProperty(value = "门店编号")
    private String storeCode;
	/**门店名称*/
	@Excel(name = "门店名称")
	@ApiModelProperty(value = "门店名称")
	private String storeName;
	/**收件人*/
	@Excel(name = "收件人", width = 15)
	@ApiModelProperty(value = "收件人")
    private String receiptName;
	/**收件人手机号*/
	@Excel(name = "收件人手机号", width = 15)
	@ApiModelProperty(value = "收件人手机号")
    private String receiptPhone;
	/**收件地址省市区*/
	@ApiModelProperty(value = "收件地址省市区")
    @Excel(name = "收件地址省市区", width = 15,exportConvert=true,importConvert = true )
    private String receiptZone;

    public String convertisReceiptZone() {
        return SpringContextUtils.getBean(ProvinceCityArea.class).getText(receiptZone);
    }

    public void convertsetReceiptZone(String text) {
        this.receiptZone = SpringContextUtils.getBean(ProvinceCityArea.class).getCode(text);
    }
	/**收件详细地址*/
	@Excel(name = "收件详细地址", width = 15)
	@ApiModelProperty(value = "收件详细地址")
    private String receiptAddress;

	/**审批状态(0:待审核，1:审核通过，2:审核不通过)*/
	@Excel(name = "审批状态(0:待审核，1:审核通过，2:审核不通过)", width = 15, dicCode = "audit_state")
	@Dict(dicCode = "audit_state")
	@ApiModelProperty(value = "审批状态(0:待审核，1:审核通过，2:审核不通过)")
	private String auditState;

	/**支付状态(0：支付中，1:已支付)*/
	@Excel(name = "支付状态(0：支付中，1:已支付)", width = 15, dicCode = "payment_state")
	@Dict(dicCode = "payment_state")
	@ApiModelProperty(value = "支付状态(0：支付中，1:已支付)")
	private String paymentState;

	//**发货状态(0:未发货，1:已发货)*//*
	@Excel(name = "发货状态(0:未发货，1:已发货)", width = 15)
	@Dict(dicCode = "shipment_state")
	@ApiModelProperty(value = "发货状态(0:未发货，1:已发货)")
	private String shipmentState;

	/**订单备注*/
	@Excel(name = "订单备注", width = 15)
	@ApiModelProperty(value = "订单备注")
	private String orderNotes;

	/**快递单号*/
	@Excel(name = "快递单号", width = 15)
	@ApiModelProperty(value = "快递单号")
	private String deliveryCodes;

	/**商品种数*/
	@Excel(name = "商品种数", width = 15)
	@ApiModelProperty(value = "商品种数")
	private int subCnt;
	/**商品总数*/
	@Excel(name = "商品总数", width = 15)
	@ApiModelProperty(value = "商品总数")
	private int subQuantity;
	/**商品总金额*/
	@Excel(name = "商品总金额", width = 15)
	@ApiModelProperty(value = "商品总金额")
	private BigDecimal subAmount;

	/**售后单数*/
	@Excel(name = "售后单数", width = 15)
	@ApiModelProperty(value = "售后单数")
	private int aftersaleCnt;


	/**创建人*/
	@Excel(name = "创建人", width = 15)
	@ApiModelProperty(value = "创建人")
	private String createUserName;
	/**创建人账号*/
	@ApiModelProperty(value = "创建人账号")
    private String createBy;
	/**创建时间*/
	@Excel(name = "创建时间", width = 15, format = "yyyy-MM-dd HH:mm:ss")
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
	@ApiModelProperty(value = "创建时间")
    private Date createTime;
	/**更新人*/
	@ApiModelProperty(value = "更新人")
    private String updateBy;
	/**更新日期*/
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
	@ApiModelProperty(value = "更新日期")
    private Date updateTime;

}
